package com.fare.taluo.vo.core;

import java.util.Iterator;
import java.util.Map;

import org.codehaus.jackson.annotate.JsonAutoDetect;
import org.codehaus.jackson.annotate.JsonAutoDetect.Visibility;

import com.fare.taluo.vo.core.PlaneInfo;

@JsonAutoDetect(fieldVisibility=Visibility.ANY)
public class LowestPriceTrendVo extends AnalyseBaseVo{

	public LowestPriceTrendVo(Map<String, PlaneInfo> channelPriceMap,String bookingType) {
		for (Iterator iterator = channelPriceMap.keySet().iterator(); iterator.hasNext();) {
			String key = (String) iterator.next();
			PlaneInfo planeInfo = channelPriceMap.get(key);
			
			if(planeInfo == null) break;
			this.price = planeInfo.getLowprPrice();
			this.agentName = planeInfo.getAgentName();
			this.bookingType = bookingType;
			this.line = planeInfo.getFromCity() + "-" + planeInfo.getToCity();
			this.siteName = planeInfo.getGrabChannel();
			this.flightNo = planeInfo.getFlightId();
			this.date = planeInfo.getFlightBatchDate();
			this.flightBatchStartTime = planeInfo.getFlightBatchStartTime();
		}
	}

	/**
	 * 代理人/航空公司当天该航线的最低价格
	 */
	public String price = "";
	
	/**
	 * 代理商名称
	 */
	public String agentName = "";
	
	/**
	 * 订票类型
	 */
	public String bookingType = "";
	
	/**起飞时间*/
	public String flightBatchStartTime = "";

	public String getPrice() {
		return price;
	}

	public void setPrice(String price) {
		this.price = price;
	}

	public String getAgentName() {
		return agentName;
	}

	public void setAgentName(String agentName) {
		this.agentName = agentName;
	}

	public String getBookingType() {
		return bookingType;
	}

	public void setBookingType(String bookingType) {
		this.bookingType = bookingType;
	}

	public String getFlightBatchStartTime() {
		return flightBatchStartTime;
	}

	public void setFlightBatchStartTime(String flightBatchStartTime) {
		this.flightBatchStartTime = flightBatchStartTime;
	}
}
